<template>
  <div>
     <iframe
         style="border:none"
         :width="searchTableWidth"
         :height="searchTableHeight"
         :src="dataUrl"
       ></iframe>
  </div>
</template>
<script>
export default {
  name: "",
  props: {},
  data() {
    return {
      dataUrl: "",
      searchTableHeight: 0,
      searchTableWidth: 0
    };
  },
  methods: {
     widthHeight() {
      this.searchTableHeight = window.innerHeight -146;
      this.searchTableWidth = window.innerWidth - 280
    },
  },
  // 初始化之前
  beforeCreate() {},
  // 初始化之后
  created() {},
  // 编译挂载之前
  beforeMount() {},
  // 编译挂载之后
  mounted() {
    // 从路由里动态获取 url地址   具体地址看libs下util.js里的 backendMenuToRoute  方法 
    this.dataUrl = this.$route.meta.iframeUrl
    window.onresize = () => {
      this.widthHeight(); // 自适应高宽度
    };
    this.$nextTick(function () {
      this.widthHeight();
    });
  },
  // 组件更新之前
  beforeUpdate() {},
  // 组件更新之后
  updated() {},
  // 组件销毁之前
  beforeDestroy() {},
  // 组件销毁之后
  destroyed() {},
  components: {}
};
</script>
<style scoped></style>
